Integrand size = 26, antiderivative size = 69 \[ \int (A+B x) \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {(A b-a B) (a+b x) \sqrt {a^2+2 a b x+b^2 x^2}}{2 b^2}+\frac {B \left (a^2+2 a b x+b^2 x^2\right )^{3/2}}{3 b^2} \]
[Out]
Time = 0.01 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {654, 623} \[ \int (A+B x) \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {(a+b x) \sqrt {a^2+2 a b x+b^2 x^2} (A b-a B)}{2 b^2}+\frac {B \left (a^2+2 a b x+b^2 x^2\right )^{3/2}}{3 b^2} \]
[In]
[Out]
Rule 623
Rule 654
Rubi steps \begin{align*} \text {integral}& = \frac {B \left (a^2+2 a b x+b^2 x^2\right )^{3/2}}{3 b^2}+\frac {\left (2 A b^2-2 a b B\right ) \int \sqrt {a^2+2 a b x+b^2 x^2} \, dx}{2 b^2} \\ & = \frac {(A b-a B) (a+b x) \sqrt {a^2+2 a b x+b^2 x^2}}{2 b^2}+\frac {B \left (a^2+2 a b x+b^2 x^2\right )^{3/2}}{3 b^2} \\ \end{align*}
Time = 0.58 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.32 \[ \int (A+B x) \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {x (3 a (2 A+B x)+b x (3 A+2 B x)) \left (\sqrt {a^2} b x+a \left (\sqrt {a^2}-\sqrt {(a+b x)^2}\right )\right )}{-6 a^2-6 a b x+6 \sqrt {a^2} \sqrt {(a+b x)^2}} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 2.
Time = 0.09 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.48
method | result | size |
default | \(\frac {\operatorname {csgn}\left (b x +a \right ) \left (b x +a \right )^{2} \left (2 B b x +3 A b -B a \right )}{6 b^{2}}\) | \(33\) |
gosper | \(\frac {x \left (2 B b \,x^{2}+3 A b x +3 a B x +6 a A \right ) \sqrt {\left (b x +a \right )^{2}}}{6 b x +6 a}\) | \(42\) |
risch | \(\frac {\sqrt {\left (b x +a \right )^{2}}\, B b \,x^{3}}{3 b x +3 a}+\frac {\sqrt {\left (b x +a \right )^{2}}\, \left (A b +B a \right ) x^{2}}{2 b x +2 a}+\frac {\sqrt {\left (b x +a \right )^{2}}\, a A x}{b x +a}\) | \(73\) |
[In]
[Out]
none
Time = 0.27 (sec) , antiderivative size = 24, normalized size of antiderivative = 0.35 \[ \int (A+B x) \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {1}{3} \, B b x^{3} + A a x + \frac {1}{2} \, {\left (B a + A b\right )} x^{2} \]
[In]
[Out]
Time = 1.08 (sec) , antiderivative size = 156, normalized size of antiderivative = 2.26 \[ \int (A+B x) \sqrt {a^2+2 a b x+b^2 x^2} \, dx=A \left (\begin {cases} \left (\frac {a}{2 b} + \frac {x}{2}\right ) \sqrt {a^{2} + 2 a b x + b^{2} x^{2}} & \text {for}\: b^{2} \neq 0 \\\frac {\left (a^{2} + 2 a b x\right )^{\frac {3}{2}}}{3 a b} & \text {for}\: a b \neq 0 \\x \sqrt {a^{2}} & \text {otherwise} \end {cases}\right ) + B \left (\begin {cases} \sqrt {a^{2} + 2 a b x + b^{2} x^{2}} \left (- \frac {a^{2}}{6 b^{2}} + \frac {a x}{6 b} + \frac {x^{2}}{3}\right ) & \text {for}\: b^{2} \neq 0 \\\frac {- \frac {a^{2} \left (a^{2} + 2 a b x\right )^{\frac {3}{2}}}{3} + \frac {\left (a^{2} + 2 a b x\right )^{\frac {5}{2}}}{5}}{2 a^{2} b^{2}} & \text {for}\: a b \neq 0 \\\frac {x^{2} \sqrt {a^{2}}}{2} & \text {otherwise} \end {cases}\right ) \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 125 vs. \(2 (52) = 104\).
Time = 0.23 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.81 \[ \int (A+B x) \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {1}{2} \, \sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} A x - \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} B a x}{2 \, b} - \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} B a^{2}}{2 \, b^{2}} + \frac {\sqrt {b^{2} x^{2} + 2 \, a b x + a^{2}} A a}{2 \, b} + \frac {{\left (b^{2} x^{2} + 2 \, a b x + a^{2}\right )}^{\frac {3}{2}} B}{3 \, b^{2}} \]
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.07 \[ \int (A+B x) \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {1}{3} \, B b x^{3} \mathrm {sgn}\left (b x + a\right ) + \frac {1}{2} \, B a x^{2} \mathrm {sgn}\left (b x + a\right ) + \frac {1}{2} \, A b x^{2} \mathrm {sgn}\left (b x + a\right ) + A a x \mathrm {sgn}\left (b x + a\right ) - \frac {{\left (B a^{3} - 3 \, A a^{2} b\right )} \mathrm {sgn}\left (b x + a\right )}{6 \, b^{2}} \]
[In]
[Out]
Time = 10.14 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.12 \[ \int (A+B x) \sqrt {a^2+2 a b x+b^2 x^2} \, dx=\frac {A\,\sqrt {{\left (a+b\,x\right )}^2}\,\left (a+b\,x\right )}{2\,b}+\frac {B\,\left (8\,b^2\,\left (a^2+b^2\,x^2\right )-12\,a^2\,b^2+4\,a\,b^3\,x\right )\,\sqrt {a^2+2\,a\,b\,x+b^2\,x^2}}{24\,b^4} \]
[In]
[Out]